﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace SmartFactory.Controllers
{
    /// <summary>
    /// 入库单控制器
    /// </summary>
    public class InboundOrderController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;

        public InboundOrderController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        /// <summary>
        /// 入库单显示页面
        /// </summary>
        /// <returns>入库单显示视图</returns>
        public IActionResult InboundOrderShowView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            ViewBag.GoldIngot = _ipAddressesConfig.GoldIngot;
            return View();
        }

        /// <summary>
        /// 入库单添加页面（弹出层）
        /// </summary>
        /// <returns>入库单显示视图（弹出层）</returns>
        public IActionResult InboundAddView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            ViewBag.GoldIngot = _ipAddressesConfig.GoldIngot;
            return View();
        }
        /// <summary>
        /// 入库单商品页面（弹出层）
        /// </summary>
        /// <returns>入库单商品视图（弹出层）</returns>
        public IActionResult InboundProductView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            ViewBag.GoldIngot = _ipAddressesConfig.GoldIngot;
            return View();
        }


        /// <summary>
        /// 入库单编辑页面（弹出层）
        /// </summary>
        /// <returns>入库单编辑视图（弹出层）</returns>
        public IActionResult InboundEditView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            ViewBag.GoldIngot = _ipAddressesConfig.GoldIngot;
            return View();
        }


        /// <summary>
        /// 入库单导入
        /// </summary>
        /// <returns>入库单导入视图（弹出层）</returns>
        public IActionResult InboundImportView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            ViewBag.GoldIngot = _ipAddressesConfig.GoldIngot;
            return View();
        }

        /// <summary>
        /// 入库单打印页面
        /// </summary>
        /// <returns>入库单导入视图（弹出层）</returns>
        public IActionResult InboundPrintView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            ViewBag.GoldIngot = _ipAddressesConfig.GoldIngot;
            return View();
        }




    }
}
